<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<!-- template designed by Marco Von Ballmoos -->
			<title>Docs For Class Swift_Plugin_AntiFlood</title>
			<link rel="stylesheet" href="../media/stylesheet.css" />
			<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
		</head>
		<body>
			<div class="page-body">			
<h2 class="class-name">Class Swift_Plugin_AntiFlood</h2>

<a name="sec-description"></a>
<div class="info-box">
	<div class="info-box-title">Description</div>
	<div class="nav-bar">
					<span class="disabled">Description</span> |
													<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
						|											<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
						
					</div>
	<div class="info-box-body">
        		<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Swift AntiFlood controller.</p>
<p class="description"><p>Closes a connection and pauses for X seconds after a number of emails have been sent.</p></p>
	<ul class="tags">
				<li><span class="field">author:</span> Chris Corbyn &lt;<a href="mailto:chris@w3style.co.uk">chris@w3style.co.uk</a>&gt;</li>
			</ul>
		<p class="notes">
			Located in <a class="field" href="_Swift---Plugin---AntiFlood.php.html">/Swift/Plugin/AntiFlood.php</a> (line <span class="field">20</span>)
		</p>
		
				
		<pre><a href="../Swift_Events/Swift_Events_Listener.html">Swift_Events_Listener</a>
   |
   --Swift_Plugin_AntiFlood</pre>
	
			</div>
</div>



	<a name="sec-var-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Variable Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
						<span class="disabled">Vars</span> (<a href="#sec-vars">details</a>)
							| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
								</div>
		<div class="info-box-body">
			<div class="var-summary">
																																								<div class="var-title">
					<span class="var-type">int</span>
					<a href="#$count" title="details" class="var-name">$count</a>
				</div>
																<div class="var-title">
					<span class="var-type">int</span>
					<a href="#$threshold" title="details" class="var-name">$threshold</a>
				</div>
																<div class="var-title">
					<span class="var-type">int</span>
					<a href="#$waitFor" title="details" class="var-name">$waitFor</a>
				</div>
											</div>
		</div>
	</div>

	<a name="sec-method-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Method Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
																		<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
				 
				|
						<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
		</div>
		<div class="info-box-body">			
			<div class="method-summary">
																																																												
												<div class="method-definition">
											<span class="method-result">Swift_Plugin_AntiFlood</span>
										<a href="#Swift_Plugin_AntiFlood" title="details" class="method-name">Swift_Plugin_AntiFlood</a>
											(<span class="var-type">int</span>&nbsp;<span class="var-name">$threshold</span>, [<span class="var-type">int</span>&nbsp;<span class="var-name">$wait</span> = <span class="var-default">0</span>])
									</div>
																<div class="method-definition">
											<span class="method-result">int</span>
										<a href="#getThreshold" title="details" class="method-name">getThreshold</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">int</span>
										<a href="#getWait" title="details" class="method-name">getWait</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#sendPerformed" title="details" class="method-name">sendPerformed</a>
											(<span class="var-type"><a href="../Swift_Events/Swift_Events_SendEvent.html">Swift_Events_SendEvent</a></span>&nbsp;<span class="var-name">&$e</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#setThreshold" title="details" class="method-name">setThreshold</a>
											(<span class="var-type">int</span>&nbsp;<span class="var-name">$threshold</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#setWait" title="details" class="method-name">setWait</a>
											(<span class="var-type">int</span>&nbsp;<span class="var-name">$time</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#wait" title="details" class="method-name">wait</a>
											(<span class="var-type">int</span>&nbsp;<span class="var-name">$seconds</span>)
									</div>
								</div>
		</div>
	</div>		

	<a name="sec-vars"></a>
	<div class="info-box">
		<div class="info-box-title">Variables</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
										<a href="#sec-var-summary">Vars</a> (<span class="disabled">details</span>)
						
			
										| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
					</div>
		<div class="info-box-body">
			<a name="var$count" id="$count"><!-- --></A>
<div class="oddrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">int</span>
			<span class="var-name">$count</span>
			 = <span class="var-default"> 0</span>			(line <span class="line-number">36</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Number of emails sent so far</p>
	
	
		
		

</div>
<a name="var$threshold" id="$threshold"><!-- --></A>
<div class="evenrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">int</span>
			<span class="var-name">$threshold</span>
			 = <span class="var-default"> null</span>			(line <span class="line-number">26</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">The number of emails to send between connections</p>
	
	
		
		

</div>
<a name="var$waitFor" id="$waitFor"><!-- --></A>
<div class="oddrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">int</span>
			<span class="var-name">$waitFor</span>
			 = <span class="var-default"> null</span>			(line <span class="line-number">31</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">The number of seconds to pause for between connections</p>
	
	
		
		

</div>
						
		</div>
	</div>
	
	<a name="sec-methods"></a>
	<div class="info-box">
		<div class="info-box-title">Methods</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
															<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
																	<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
						
		</div>
		<div class="info-box-body">
			<A NAME='method_detail'></A>

<a name="methodSwift_Plugin_AntiFlood" id="Swift_Plugin_AntiFlood"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">Constructor Swift_Plugin_AntiFlood</span> (line <span class="line-number">43</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Constructor</p>
	
	<div class="method-signature">
		<span class="method-result">Swift_Plugin_AntiFlood</span>
		<span class="method-name">
			Swift_Plugin_AntiFlood
		</span>
					(<span class="var-type">int</span>&nbsp;<span class="var-name">$threshold</span>, <span class="var-type">int</span>&nbsp;<span class="var-name">$wait</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$threshold</span><span class="var-description">: Number of emails to send before re-connecting</span>			</li>
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$wait</span><span class="var-description">: The timeout in seconds between connections</span>			</li>
				</ul>
		
			
	</div>
<a name="methodgetThreshold" id="getThreshold"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">getThreshold</span> (line <span class="line-number">60</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Get the number of emails which need to be sent for reconnection to occur</p>
	
	<div class="method-signature">
		<span class="method-result">int</span>
		<span class="method-name">
			getThreshold
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodgetWait" id="getWait"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">getWait</span> (line <span class="line-number">76</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Get the number of seconds the plugin should wait for before re-connecting</p>
	
	<div class="method-signature">
		<span class="method-result">int</span>
		<span class="method-name">
			getWait
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodsendPerformed" id="sendPerformed"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">sendPerformed</span> (line <span class="line-number">94</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Swift's SendEvent listener.</p>
<p class="description"><p>Invoked when Swift sends a message</p></p>
	<ul class="tags">
				<li><span class="field">throws:</span> Swift_ConnectionException If the connection cannot be closed/re-opened</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			sendPerformed
		</span>
					(<span class="var-type"><a href="../Swift_Events/Swift_Events_SendEvent.html">Swift_Events_SendEvent</a></span>&nbsp;<span class="var-name">&$e</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type"><a href="../Swift_Events/Swift_Events_SendEvent.html">Swift_Events_SendEvent</a></span>
				<span class="var-name">&$e</span><span class="var-description">: The event information</span>			</li>
				</ul>
		
			
	</div>
<a name="methodsetThreshold" id="setThreshold"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">setThreshold</span> (line <span class="line-number">52</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Set the number of emails which must be sent for a reconnection to occur</p>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			setThreshold
		</span>
					(<span class="var-type">int</span>&nbsp;<span class="var-name">$threshold</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$threshold</span><span class="var-description">: Number of emails</span>			</li>
				</ul>
		
			
	</div>
<a name="methodsetWait" id="setWait"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">setWait</span> (line <span class="line-number">68</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Set the number of seconds the plugin should wait for before reconnecting</p>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			setWait
		</span>
					(<span class="var-type">int</span>&nbsp;<span class="var-name">$time</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$time</span><span class="var-description">: Time in seconds</span>			</li>
				</ul>
		
			
	</div>
<a name="methodwait" id="wait"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">wait</span> (line <span class="line-number">84</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Sleep for a given number of seconds</p>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			wait
		</span>
					(<span class="var-type">int</span>&nbsp;<span class="var-name">$seconds</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$seconds</span><span class="var-description">: Number of seconds to wait for</span>			</li>
				</ul>
		
			
	</div>
							<h4>Inherited Methods</h4>
				<a name='inherited_methods'><!-- --></a>	
									<!-- =========== Summary =========== -->
					<p>Inherited From <span class="classname"><a href="../Swift_Events/Swift_Events_Listener.html">Swift_Events_Listener</a></span></p>
					<blockquote>
													<span class="method-name"><a href="../Swift_Events/Swift_Events_Listener.html#methodimplementing">Swift_Events_Listener::implementing()</a></span><br>
											</blockquote>
										
		</div>
	</div>


	<p class="notes" id="credit">
		Documentation generated on Wed, 26 Mar 2008 20:33:42 +1100 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.1</a>
	</p>
	</div></body>
</html>